# coding: utf-8

"""
    Firefly III API Client

    This is the Python client for Firefly III API  # noqa: E501

    The version of the OpenAPI document: 0.10.0
    Contact: thegrumpydictator@gmail.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class BillUpdate(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'active': 'bool',
        'amount_max': 'float',
        'amount_min': 'float',
        'currency_code': 'str',
        'currency_id': 'int',
        'date': 'date',
        'name': 'str',
        'notes': 'str',
        'repeat_freq': 'str',
        'skip': 'int'
    }

    attribute_map = {
        'active': 'active',
        'amount_max': 'amount_max',
        'amount_min': 'amount_min',
        'currency_code': 'currency_code',
        'currency_id': 'currency_id',
        'date': 'date',
        'name': 'name',
        'notes': 'notes',
        'repeat_freq': 'repeat_freq',
        'skip': 'skip'
    }

    def __init__(self, active=None, amount_max=None, amount_min=None, currency_code=None, currency_id=None, date=None, name=None, notes=None, repeat_freq=None, skip=None):  # noqa: E501
        """BillUpdate - a model defined in OpenAPI"""  # noqa: E501

        self._active = None
        self._amount_max = None
        self._amount_min = None
        self._currency_code = None
        self._currency_id = None
        self._date = None
        self._name = None
        self._notes = None
        self._repeat_freq = None
        self._skip = None
        self.discriminator = None

        if active is not None:
            self.active = active
        self.amount_max = amount_max
        self.amount_min = amount_min
        if currency_code is not None:
            self.currency_code = currency_code
        if currency_id is not None:
            self.currency_id = currency_id
        self.date = date
        self.name = name
        if notes is not None:
            self.notes = notes
        self.repeat_freq = repeat_freq
        if skip is not None:
            self.skip = skip

    @property
    def active(self):
        """Gets the active of this BillUpdate.  # noqa: E501

        If the bill is active.  # noqa: E501

        :return: The active of this BillUpdate.  # noqa: E501
        :rtype: bool
        """
        return self._active

    @active.setter
    def active(self, active):
        """Sets the active of this BillUpdate.

        If the bill is active.  # noqa: E501

        :param active: The active of this BillUpdate.  # noqa: E501
        :type: bool
        """

        self._active = active

    @property
    def amount_max(self):
        """Gets the amount_max of this BillUpdate.  # noqa: E501


        :return: The amount_max of this BillUpdate.  # noqa: E501
        :rtype: float
        """
        return self._amount_max

    @amount_max.setter
    def amount_max(self, amount_max):
        """Sets the amount_max of this BillUpdate.


        :param amount_max: The amount_max of this BillUpdate.  # noqa: E501
        :type: float
        """
        if amount_max is None:
            raise ValueError("Invalid value for `amount_max`, must not be `None`")  # noqa: E501

        self._amount_max = amount_max

    @property
    def amount_min(self):
        """Gets the amount_min of this BillUpdate.  # noqa: E501


        :return: The amount_min of this BillUpdate.  # noqa: E501
        :rtype: float
        """
        return self._amount_min

    @amount_min.setter
    def amount_min(self, amount_min):
        """Sets the amount_min of this BillUpdate.


        :param amount_min: The amount_min of this BillUpdate.  # noqa: E501
        :type: float
        """
        if amount_min is None:
            raise ValueError("Invalid value for `amount_min`, must not be `None`")  # noqa: E501

        self._amount_min = amount_min

    @property
    def currency_code(self):
        """Gets the currency_code of this BillUpdate.  # noqa: E501

        Use either currency_id or currency_code  # noqa: E501

        :return: The currency_code of this BillUpdate.  # noqa: E501
        :rtype: str
        """
        return self._currency_code

    @currency_code.setter
    def currency_code(self, currency_code):
        """Sets the currency_code of this BillUpdate.

        Use either currency_id or currency_code  # noqa: E501

        :param currency_code: The currency_code of this BillUpdate.  # noqa: E501
        :type: str
        """

        self._currency_code = currency_code

    @property
    def currency_id(self):
        """Gets the currency_id of this BillUpdate.  # noqa: E501

        Use either currency_id or currency_code  # noqa: E501

        :return: The currency_id of this BillUpdate.  # noqa: E501
        :rtype: int
        """
        return self._currency_id

    @currency_id.setter
    def currency_id(self, currency_id):
        """Sets the currency_id of this BillUpdate.

        Use either currency_id or currency_code  # noqa: E501

        :param currency_id: The currency_id of this BillUpdate.  # noqa: E501
        :type: int
        """

        self._currency_id = currency_id

    @property
    def date(self):
        """Gets the date of this BillUpdate.  # noqa: E501


        :return: The date of this BillUpdate.  # noqa: E501
        :rtype: date
        """
        return self._date

    @date.setter
    def date(self, date):
        """Sets the date of this BillUpdate.


        :param date: The date of this BillUpdate.  # noqa: E501
        :type: date
        """
        if date is None:
            raise ValueError("Invalid value for `date`, must not be `None`")  # noqa: E501

        self._date = date

    @property
    def name(self):
        """Gets the name of this BillUpdate.  # noqa: E501


        :return: The name of this BillUpdate.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this BillUpdate.


        :param name: The name of this BillUpdate.  # noqa: E501
        :type: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

    @property
    def notes(self):
        """Gets the notes of this BillUpdate.  # noqa: E501


        :return: The notes of this BillUpdate.  # noqa: E501
        :rtype: str
        """
        return self._notes

    @notes.setter
    def notes(self, notes):
        """Sets the notes of this BillUpdate.


        :param notes: The notes of this BillUpdate.  # noqa: E501
        :type: str
        """

        self._notes = notes

    @property
    def repeat_freq(self):
        """Gets the repeat_freq of this BillUpdate.  # noqa: E501

        How often the bill must be paid.  # noqa: E501

        :return: The repeat_freq of this BillUpdate.  # noqa: E501
        :rtype: str
        """
        return self._repeat_freq

    @repeat_freq.setter
    def repeat_freq(self, repeat_freq):
        """Sets the repeat_freq of this BillUpdate.

        How often the bill must be paid.  # noqa: E501

        :param repeat_freq: The repeat_freq of this BillUpdate.  # noqa: E501
        :type: str
        """
        if repeat_freq is None:
            raise ValueError("Invalid value for `repeat_freq`, must not be `None`")  # noqa: E501
        allowed_values = ["weekly", "monthly", "quarterly", "half-year", "yearly"]  # noqa: E501
        if repeat_freq not in allowed_values:
            raise ValueError(
                "Invalid value for `repeat_freq` ({0}), must be one of {1}"  # noqa: E501
                .format(repeat_freq, allowed_values)
            )

        self._repeat_freq = repeat_freq

    @property
    def skip(self):
        """Gets the skip of this BillUpdate.  # noqa: E501

        How often the bill must be skipped. 1 means a bi-monthly bill.  # noqa: E501

        :return: The skip of this BillUpdate.  # noqa: E501
        :rtype: int
        """
        return self._skip

    @skip.setter
    def skip(self, skip):
        """Sets the skip of this BillUpdate.

        How often the bill must be skipped. 1 means a bi-monthly bill.  # noqa: E501

        :param skip: The skip of this BillUpdate.  # noqa: E501
        :type: int
        """

        self._skip = skip

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, BillUpdate):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
